package modeller.databasedesignmodel.relation.index;

import modeller.databasedesignmodel.Attribute;
import modeller.databasedesignmodel.servicedemand.transaction.sqlquery.calculatorfetcher.ISQLQueryServiceDemandCalculatorFetcher;
import modeller.databasedesignmodel.servicedemand.transaction.sqlquery.demandFetcher.ISQLQueryServiceDemandCalculator;

import java.util.LinkedList;

/**
 * Created by:  Jason Ye
 * Date:        25/03/2012
 * Time:        16:38
 */
public class UniqueUnclusteredTreeIndex extends UnclusteredTreeIndex {

    public UniqueUnclusteredTreeIndex(LinkedList<Attribute> attributesForIndex) {
        this.m_attributeList = attributesForIndex;
    }

    @Override
    public boolean isUnique() {
        return true;
    }

    @Override
    public ISQLQueryServiceDemandCalculator offerCalculator(ISQLQueryServiceDemandCalculatorFetcher visitorFetcher) {
        return visitorFetcher.fetch(this);
    }

}
